﻿<%@ Page Title="" Language="C#" MasterPageFile="~/View/Shared/Window.master" AutoEventWireup="true" CodeFile="PExpenseReceipt.aspx.cs" Inherits="View_Purchase_PExpenseReceipt" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" Runat="Server">
    Phiếu nhập chi phí mua hàng
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<script type="text/javascript" src="../../Scripts/ResizeWindow.js"></script>
    <form id="Form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <fieldset>
            <table>
                <tr class="alignleft">
                    <td>
                        <label>Số Serial: </label>
                    </td>
                    
                    <td style="width: 330px">
                        <asp:TextBox ID="txtPESerialNo" Width="160px" runat="server"/>
                    </td>
                    
                    <td>
                        <label>Ngày hoạch toán: </label>
                    </td>

                    <td>
                        <telerik:RadDatePicker ID="dpPEHTDate" runat="server">
                            <ClientEvents OnPopupOpening="AdjustRadWidow" OnPopupClosing="AdjustRadWidow" />
                        </telerik:RadDatePicker>
                    </td>
                </tr>

                <tr class="alignleft">
                    <td>
                        <label>Số chứng từ: </label>
                    </td>
                    
                    <td style="width: 330px">
                        <asp:TextBox ID="txtPEVoucherNo" Width="160px" runat="server"/>
                    </td>
                    
                    <td>
                        <label>Ngày chứng từ: </label>
                    </td>

                    <td>
                        <telerik:RadDatePicker ID="dpPEVoucherDate" runat="server">
                            <ClientEvents OnPopupOpening="AdjustRadWidow" OnPopupClosing="AdjustRadWidow" />
                        </telerik:RadDatePicker>
                    </td>
                </tr>

                <tr class="alignleft">
                    <td>
                        <label>Mã nhà cung cấp: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtPEHome" Width="160px" runat="server"/>
                    </td>
                    
                   <td>
                        <label>Quyển số: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtPEBookNo" Width="160px" runat="server"/>
                    </td>
                </tr>

                <tr class="alignleft">
                    <td>
                        <label>Tên nhà cung cấp: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtPEHomeName" Width="160px" runat="server"/>
                    </td>
                    
                    <td>
                        <label>Tỷ giá: </label>
                    </td>

                    <td>
                        <telerik:RadComboBox runat="server" Width="61px" ID="cbPECurrency"/>
                        &nbsp;
                        <asp:TextBox ID="txtPEVND" Width="53px" runat="server" Height="19px" />
                    </td>
                </tr>
                <tr class="alignleft">
                    <td>
                        <label>Địa chỉ: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtPEAddress" Width="300px" runat="server"/>
                    </td>
                </tr>
                
                <tr class="alignleft">
                    <td>
                        <label>Mã số thuế: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtPETaxCode" Width="160px" runat="server"/>
                    </td>
                    
                </tr>
                <tr class="alignleft">
                    <td>
                        <label>Diễn giải: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtPEDescription" Width="300px" runat="server"/>
                    </td>
                </tr>
                <tr class="alignleft">
                    <td>
                        <label>Tài khoản có: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtPEHasAcc" Width="160px" runat="server" />
                        <telerik:RadButton runat="server" Width="26px" ID="bPESearch" Text="+ "/>
                    </td>
                </tr>
            </table>
        </fieldset>
        
        <fieldset>
            <legend><strong>Thông tin chi phí</strong></legend>
                <div style="margin-top: 5px">
                    <table width="800px">
                        <tr>
                            <td>
                                <label>Tổng chi phí: </label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPESumExpense" Width="100px" runat="server"/>
                            </td>
                            <td>
                                <label>Thuế: </label>
                            </td>
                            <td>
                                <telerik:RadComboBox runat="server" Width="61px" ID="cbPETax"/>
                            </td>
                            <td>
                                <label>Loại phân bổ (1-tiền, 2-Số lượng): </label>
                            </td>
                            <td>
                                <telerik:RadComboBox runat="server" Width="61px" ID="cbPEAllocate"/>
                            </td>
                            <td>
                                <telerik:RadButton ID="bPEAllocate" runat="server" Text="Phân bổ tự động" Width="100px"/>
                            </td>
                        </tr>
                    </table>

                    <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" HorizontalAlign="NotSet">
                        <telerik:RadGrid ID="rgPExpenseReceiptInfo" runat="server" AllowSorting="true"
                            AllowPaging="true" PageSize="6" AllowFilteringByColumn="true" ShowStatusBar="true">
                            <MasterTableView DataKeyNames="" AutoGenerateColumns="false" Width="800px">
                                <Columns>
                                    <telerik:GridNumericColumn DataField="" HeaderText="STT" UniqueName="" />
                        
                                    <telerik:GridBoundColumn DataField="" HeaderText="Mã vật tư" UniqueName="" />
                        
                                    <telerik:GridNumericColumn DataField="" HeaderText="Tiền hàng" UniqueName=""/>
                        
                                    <telerik:GridNumericColumn DataField="" HeaderText="Đơn vị vật tư" UniqueName=""/>

                                    <telerik:GridNumericColumn DataField="" HeaderText="Mã kho" UniqueName="" />
                        
                                    <telerik:GridNumericColumn DataField="" HeaderText="Số lượng" UniqueName=""/>

                                    <telerik:GridNumericColumn DataField="" HeaderText="Chi phí" UniqueName=""/>

                                    <telerik:GridBoundColumn DataField="" HeaderText="Tài khoản nợ" UniqueName="" />
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </telerik:RadAjaxPanel>
                </div>
        </fieldset>

        <table>
            <tr>
                <td>
                    <label>Số hóa đơn: </label>
                </td>
                <td width="300px">
                    <asp:TextBox ID="txtPEFeeNo" Width="100px" runat="server"/>
                    <telerik:RadButton ID="bPESearchFee" runat="server" Text="+ " Width="27px"/>
                </td>
                <td>
                    <label>Số lượng: </label>
                </td>
                <td>
                    <asp:TextBox ID="txtPNo" Width="100px" runat="server"/>
                </td>
                <td>
                    <label>Chi phí: </label>
                </td>
                <td>
                    <asp:TextBox ID="txtPEExpense" Width="100px" runat="server"/>
                </td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td>
                    <label>Tiền thuế: </label>
                </td>
                <td>
                    <asp:TextBox ID="txtPETax" Width="100px" runat="server"/>
                </td>
                <td>
                    <label>Tổng tiền: </label>
                </td>
                <td>
                    <asp:TextBox ID="txtPESumMoney" Width="100px" runat="server"/>
                </td>
            </tr>
        </table>

        <div class="button">
            <telerik:RadButton ID="bAccept" runat="server" Text="Chấp nhận" Width="100px"></telerik:RadButton>
            <telerik:RadButton ID="bPrint" runat="server" Text="In" Width="100px"></telerik:RadButton>
            <telerik:RadButton ID="bClose" runat="server" Text="Hủy bỏ" Width="100px"></telerik:RadButton>
        </div>
    </form>
</asp:Content>